package com.mdd.admin.validate.staff;

import com.mdd.common.validator.annotation.IntegerContains;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 师傅参数
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "师傅请求对象", description = "师傅请求对象")
public class StaffParam implements Serializable {

    private static final long serialVersionUID = 1L;

    public interface create {
    }

    public interface update {
    }

    public interface delete {
    }

    @NotNull(message = "id参数必传且需大于0", groups = {update.class, delete.class})
    @ApiModelProperty(value = "主键id")
    private Long id;

    @NotNull(message = "userId参数缺失", groups = {create.class, update.class})
    @DecimalMin(value = "0", message = "userId参数值不能少于0", groups = {create.class, update.class})
    @ApiModelProperty(value = "用户id")
    private Long userId;


    @NotNull(message = "sn参数缺失", groups = {create.class, update.class})
    @Length(max = 32, message = "sn参数不能超出32个字符", groups = {create.class, update.class})
    @ApiModelProperty(value = "师傅编号")
    private String sn;


    @NotNull(message = "name参数缺失", groups = {create.class, update.class})
    @Length(max = 255, message = "name参数不能超出255个字符", groups = {create.class, update.class})
    @ApiModelProperty(value = "师傅姓名")
    private String name;


    @NotNull(message = "sex参数缺失", groups = {create.class, update.class})
    @DecimalMin(value = "0", message = "sex参数值不能少于0", groups = {create.class, update.class})
    @ApiModelProperty(value = "性别")
    private Integer sex;


    @NotNull(message = "mobile参数缺失", groups = {create.class, update.class})
    @Length(max = 15, message = "mobile参数不能超出15个字符", groups = {create.class, update.class})
    @ApiModelProperty(value = "电话")
    private String mobile;


    @NotNull(message = "服务参数缺失", groups = {create.class, update.class})
    @ApiModelProperty(value = "服务id,用逗号隔开")
    private String goodsIds;


    @NotNull(message = "provinceId参数缺失", groups = {create.class, update.class})
    @DecimalMin(value = "0", message = "provinceId参数值不能少于0", groups = {create.class, update.class})
    @ApiModelProperty(value = "省id")
    private Long provinceId;


    @NotNull(message = "cityId参数缺失", groups = {create.class, update.class})
    @DecimalMin(value = "0", message = "cityId参数值不能少于0", groups = {create.class, update.class})
    @ApiModelProperty(value = "市id")
    private Long cityId;


    @NotNull(message = "districtId参数缺失", groups = {create.class, update.class})
    @DecimalMin(value = "0", message = "districtId参数值不能少于0", groups = {create.class, update.class})
    @ApiModelProperty(value = "区id")
    private Long districtId;


    @Length(max = 255, message = "address参数不能超出255个字符", groups = {create.class, update.class})
    @ApiModelProperty(value = "详细地址")
    private String address;

    @ApiModelProperty(value = "经度")
    private String longitude;

    @ApiModelProperty(value = "纬度")
    private String latitude;


    @NotNull(message = "status参数缺失", groups = {create.class, update.class})
    @DecimalMin(value = "0", message = "status参数值不能少于0", groups = {create.class, update.class})
    @ApiModelProperty(value = "状态:1-启用;0-停用;")
    private Integer status;


    @NotNull(message = "isRecommend参数缺失", groups = {create.class, update.class})
    @IntegerContains(values = {0, 1}, message = "isRecommend参数值不在符合范围", groups = {create.class, update.class})
    @ApiModelProperty(value = "是否首页推荐:1-是;0-否")
    private Integer isRecommend;

    @NotNull(message = "level参数缺失", groups = {create.class, update.class})
    @ApiModelProperty(value = "师傅等级： p3、 p2、 p1")
    private String level;

    @NotNull(message = "isFreelance参数缺失", groups = {create.class, update.class})
    @ApiModelProperty(value = "是否兼职 0代表全职 1代表兼职")
    private Integer isFreelance;

    @ApiModelProperty(value = "体力值")
    private Integer physical;

    @ApiModelProperty(value = "师傅类型， 0普通师傅 1保姆")
    private Integer type;

}
